<template>
  <div class="component-item" :class="active?'selected':''" v-if="moduleData">
    <div class="flex center preview-item-top">
      <div class="del" @click.stop="delModule">
        <Icon type="ios-trash" size='22' style="color: white;" />
      </div>
    </div>
    <div class="notice disFlex Flex-center">{{moduleData.data.text}}</div>
  </div>
</template>

<script>

export default {
    name: 'NoticeModule',   
  props: {
    /**
       * @description 起始值，即动画开始前显示的数值
       */
      moduleData: {
        type: Object,
        default: null
      },
      active: {
        type: Boolean,
        default: false
      }
  },
    data () {
        return {
          curpage: 0
      }
    },
    methods: {
      delModule() {
      this.$emit("delModule",this.moduleData);    
      }
    },
    created() {
    },
    components: {
  }
 }
</script>

<style scoped>

@import url("../baseModule.less");

.notice {
  width: 100%;
  font-size: 12px;
  color: #333;
  padding: 9px 20px;
  background: #FFFCE8;
  box-sizing: border-box;
}
</style>
